<template>
  <div>
    <NavType/>
    <List/>
    <Recommend/>
    <Rank/>
    <Like/>
    <Floor v-for="floor in floorList" :key="floor.id" :floor='floor'/>
    <Brand/>
  </div>
</template>

<script>
import Brand from '@pages/Home/Brand/index.vue'
import Floor from '@pages/Home/Floor/index.vue'
import Like from '@pages/Home/Like/index.vue'
import List from '@pages/Home/List/index.vue'
import Rank from '@pages/Home/Rank/index.vue'
import Recommend from '@pages/Home/Recommend/index.vue'
import {requestFloorList} from '@/api'
export default {
name:'Home',
components:{
  Brand,
  Floor,
  Like,
  List,
  Rank,
  Recommend
},
data(){
  return{
    floorList:[],
  }
},
mounted(){
   //初始化floor的数据
  this.getFloorList()
},
methods:{
  //初始化floor数据的逻辑
  async getFloorList(){
    const result=await requestFloorList();
    this.floorList=result
  }
}
}
</script>

<style>

</style>